package com.hyk.feign;

import com.hyk.config.auth.OAuth2FeignConfig;
import com.hyk.dto.CoinDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "finance-service",
            contextId = "coin",
            configuration = OAuth2FeignConfig.class,
            path = "/coins")
public interface CoinFeign {

    @GetMapping("/getCoinByIds")
    Map<Long, CoinDto> getCoinByIds(@RequestParam("ids") List<Long> ids);
}
